<!DOCTYPE html>
<html>
<head>
    @include("/common/init.html"){}
</head>
<body>
	@include("/common/commonunity_header.html",{title:'社区'}){}
	<div class="layui-container fly-marginTop">
  <div class="fly-panel" pad20 style="padding-top: 5px;">
    <div class="layui-form layui-form-pane">
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title">
          <li class="layui-this">发表新帖<!-- 编辑帖子 --></li>
        </ul>
        @if(loginAccount.post_status! == 1){
	        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
	          <div class="layui-tab-item layui-show">
	            <form  method="post" action="${basePath}/post/save">
	              <div class="layui-row layui-col-space15 layui-form-item">
	                <div class="layui-col-md3">
		                  <label class="layui-form-label">所在专栏</label>
		                  <div class="layui-input-block">
		                  	@if(global.isNullOrEmpty(postDetail.id!)){
		                  		<select lay-verify="required" name="class" lay-filter="column"> 
			                      <option></option>
			                      @for(item in list!){
			                      	<option value="${item.id}" >${item.name}</option>
			                      @}
		                    	</select>
		                  	@}else{
		                  		<select lay-verify="required" name="class" lay-filter="column" disabled> 
			                      <option value="1212">11212</option>
		                    	</select>
		                    @}
		                  </div>
		                </div>
		                <div class="layui-col-md9">
		                  <label for="L_title" class="layui-form-label">标题</label>
		                  <div class="layui-input-block">
		                  	@if(global.isNullOrEmpty(postDetail.title!)){
		                    <input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input"/>
		                  	@}else{
		                  	<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input" readonly value="${postDetail.title!}"/>
		                    @}
		                  </div>
		                </div>
	              	</div>
		              <div class="layui-form-item layui-form-text">
		                <div class="layui-input-block">
		                  <textarea id="L_content" name="content" required lay-verify="required" placeholder="详细描述" class="layui-textarea fly-editor" style="height: 260px;">${postDetail.content!}</textarea>
		                </div>
		              </div>
		              <div class="layui-form-item">
		                <div class="layui-inline">
		                  <label class="layui-form-label">悬赏金币数量</label>
		                  <div class="layui-input-inline" style="width: 190px;">
		                  	@if(global.isNullOrEmpty(postDetail.price!)){
		                    <input type="number" min="0" max="99" name="experience" required lay-verify="required" autocomplete="off" value="0" class="layui-input"/>
		                  	@}else{
		                  	<input type="number" autocomplete="off" class="layui-input" readonly value="${postDetail.price!}"/>
		                    @}
		                  </div>
		                  <div class="layui-form-mid layui-word-aux">发表后无法更改金币</div>
		                </div>
		              </div>
		              <div class="layui-form-item">
		                <label for="L_vercode" class="layui-form-label">人类验证</label>
		                <div class="layui-input-inline">
		                  <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="请回答后面的问题" autocomplete="off" class="layui-input">
		                </div>
		                <div class="layui-form-mid">
		                  <span style="color: #c00;">1+1=?</span>
		                </div>
		              </div>
		              <div class="layui-form-item">
		                <button class="layui-btn" lay-filter="*" lay-submit>立即发布</button>
		              </div>
            		</form>
          		</div>
	        </div>
	       @}else{
	       	  你没有权限发布帖子，请联系管理员进行解封。
	       @}
	      </div>
	    </div>
	  </div>
	</div>
	<script type="text/javascript" src="${baseStaticUrl}/layui/layui.js"></script>
	<script>
		layui.cache.page = '';
		layui.cache.user = {
		  username: '游客'
		  ,uid: -1
		  ,avatar: '../res/images/avatar/00.jpg'
		  ,experience: 83
		  ,sex: '男'
		};
		layui.config({
		  version: "3.0.0"
		  ,base: '${baseStaticUrl}/mods/'
		}).extend({
		  fly: 'index'
		}).use('fly');
	</script>
		
	<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));</script>

</body>